package com.erp.service.impl;

import com.erp.bean.Evaluate;
import com.erp.dao.EvaluateDao;
import com.erp.dao.impl.EvaluateDaoImpl;
import com.erp.service.EvaluateService;

import java.util.List;

/**
 * @author mtf
 * 评价类业务逻辑实体类
 */
public class EvaluateServiceImpl implements EvaluateService {
    //
    EvaluateDao evaluateDao =new EvaluateDaoImpl();

    @Override
    public List<Evaluate> findAll() {
        return evaluateDao.findAll();
    }

    @Override
    public Evaluate findByEvaId(int evaid) {
        return evaluateDao.findByEvaId(evaid);
    }

    @Override
    public boolean add(Evaluate evaluate) {
        return evaluateDao.add(evaluate)>0?true:false;
    }

    @Override
    public boolean update(Evaluate evaluate) {
        return evaluateDao.update(evaluate)>0?true:false;
    }

    @Override
    public List<Evaluate> findBySupId(int supid) {
        return evaluateDao.findBySupId(supid);
    }

    @Override
    public List<Evaluate> find(String column, String keywords) {
        return evaluateDao.find(column, keywords);
    }

    @Override
    public boolean findByOId(String oid) {
        return evaluateDao.findByOId(oid)!=null?false:true;
    }
}
